home *** CD-ROM | disk | FTP | other *** search
/ Armageddon - Interactive Preview / Interactive Preview: Armageddon.iso / pc / control.dxr / Scripts & Behaviors_21_M2 Behavior.ls < prev    next >
Encoding:
Text File  |  1998-05-19  |  567 b   |  22 lines

  1. property pThisSprite, pTotalCasts, pCounter, pStartCast
  2.  
  3. on new me
  4.   set pThisSprite to the currentSpriteNum
  5.   set pTotalCasts to 25
  6.   set pCounter to 1
  7.   set pStartCast to the memberNum of sprite pThisSprite
  8. end
  9.  
  10. on exitFrame me
  11.   if random(20) > 12 then
  12.     if pCounter > pTotalCasts then
  13.       set pCounter to 0
  14.       set the memberNum of sprite pThisSprite to pStartCast
  15.     else
  16.       set thisMember to the memberNum of sprite pThisSprite
  17.       set the memberNum of sprite pThisSprite to thisMember + 1
  18.       set pCounter to pCounter + 1
  19.     end if
  20.   end if
  21. end
  22.